#!/bin/zsh
set -eu
installer="${0:A:h:h}/Resources/distribution/bin/install"
if "$installer"; then
 /usr/bin/osascript -e 'display dialog "DontDumb is installed. Restart OpenCode Desktop 2.2.5, open a coding chat, and run /dontdumb on." with title "DontDumb" buttons {"OK"} default button "OK"'
else
 /usr/bin/osascript -e 'display dialog "DontDumb could not install. Check that Node 22+ is available and OpenCode settings are valid JSON. Existing settings were preserved." with title "DontDumb" buttons {"OK"} default button "OK"'
 exit 1
fi
